import React, { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import './index.scss';

export default function Start() {
  const navigate = useNavigate()
  useEffect(() => {
    const timer = setInterval(() => {
      navigate('/launch')
    }, 5000);

    return () => {
      clearInterval(timer);
    };
  }, []);
  return (
    <div className="cls">
      <button className="btns" onClick={() => navigate('/launch')}>
        跳过
      </button>
      <div className="loader"></div>
    </div>
  );
}